3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
To write a drawing engine, you might need to implement several private methods for creating and disposing of color lookup tables. Pointers to your drawing engine's color lookup table methods are returned to QuickDraw 3D RAVE by your TQAEngineGetMethod method. See page [link] for details.
A drawing engine may define a method to create a new color lookup table. This method is optional and must be supported only by drawing engines that support color lookup tables.
typedef TQAError (*TQAColorTableNew) (
TQAColorTableType pixelType,
void *pixelData,
long transparentIndex,
TQAColorTable **newTable);
Your TQAColorTableNew function is called whenever an application calls QAColorTableNew . Your function should return, in the buffer pointed to by the newTable parameter, a pointer to a new color lookup table of the type specified by the pixelType parameter. The color table data is passed to your function in the pixelData parameter. Your method should copy that data so that the caller can dispose of the memory it occupies.
Currently, QuickDraw 3D RAVE supports only 32-bit RGB color lookup table entries. Your drawing engine might reduce the size of individual color lookup table entries to fit into its on-board memory.
A drawing engine may define a method to dispose of color lookup table. This method is optional and must be supported only by drawing engines that support color lookup tables.
typedef void (*TQAColorTableDelete) (TQAColorTable *colorTable);
Previous | QD3D Book | Overview | Chapter Contents | Next |